unit ButtonForm;

interface

uses Windows,StdCtrls,Forms,Classes,Controls,Messages,Dialogs;

type
TButtonForm = class(TButton)

private

public
aForm:Tform;
constructor Create(AOwner:TComponent);
procedure Click;override;
procedure AddButton(TheForm:TForm;TheParent:TwinControl);
end;


implementation

constructor TButtonForm.Create(AOwner:TComponent);
begin
 inherited Create(AOwner);
 Align:=alTop;
 Height:=40;
end;

procedure TButtonForm.AddButton(TheForm:TForm;TheParent:TwinControl);
begin
  caption:=TheForm.Caption;
  aForm:= TheForm;
  Parent:= TheParent;
end;

procedure TButtonForm.Click;
begin
 aform.Show;
   inherited;
end;




end.
